//
// Created by jinbang.li on 2023/8/5.
//

#ifndef OPENPLAYDEMO_IOPPLAYER_H
#define OPENPLAYDEMO_IOPPLAYER_H

#include "../Demux/OpThread.h"//class OpThread;
#include "../Data/OpParameter.h"


class IOpDemux;

class IOpDecode;

class IOpResample;

class IOpAudioPlay;

class IOpVideoView;
class IOpPlayer: public OpThread{
public:
    static IOpPlayer *get(unsigned char index = 0);
    virtual bool open(const char *path);
    virtual bool start();
    virtual void InitView(void *win);
    bool isHardDecode = false;

    virtual bool re_open(const char *path);

    OpParameter outPara;

    IOpDemux* demux = 0;

    IOpDecode* vdecode = 0;

    IOpDecode* adecode = 0;

    IOpResample* resample = 0;

    IOpAudioPlay* audioPlay = 0;

    IOpVideoView* videoView = 0;
protected:
    IOpPlayer(){};
};


#endif //OPENPLAYDEMO_IOPPLAYER_H
